package com.example.team.service.Imp;

import com.example.team.dao.IEmployeeDao;
import com.example.team.entity.Employee;
import com.example.team.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

//服务接口规范的方法实现
//编写者：沈超
// 时间：2023/10/28
@Component
public class IEmployeeServiceImpl implements IEmployeeService {
    @Autowired
    private IEmployeeDao employeeDao;

    @Override
    public int insertEmployee(Employee employee) {
        return employeeDao.insertEmployee(employee);
    }

    @Override
    public int deleteEmployee(Employee employee) {
        return employeeDao.deleteEmployee(employee);
    }

    @Override
    public int updateEmployee(Employee employee) {
        return employeeDao.updateEmployee(employee);
    }
    public List<Employee> getAllEmployee(Employee employee){
        return employeeDao.getAllEmployee(employee);
    }
    public Employee getEmployee(Employee employee){
        return employeeDao.getEmployee(employee);
    }
}
